﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LearnCSharp_1
{
    class Test
    {
        static void Main_Class(string[] args)
        {
            var p1 = new Point(0, 0);
            var p2 = new Point(10, 20);
            Console.ReadKey();

            var pair = new Pair<int, string>(1, "two");
            int i = pair.First;
            string s = pair.Second;
            Console.ReadKey();

        }
    }
    public class Point
    {
        public int X { get; }
        public int Y { get; }
        public Point(int x, int y) => (X, Y) = (x, y);

    }

    public class Pair<TFirst, TSecond>
    {
        public TFirst First { get; }
        public TSecond Second { get; }

        public Pair(TFirst first, TSecond second) => (First, Second) = (first, second);
    }

    public class Point3D : Point
    {
        public int Z { get; set; }

        public Point3D(int x, int y, int z) : base(x, y)
        {
            Z = z;
        }
    }
}
